package com.ssy.lingxi.platform.manage.controller.paas;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.platform.manage.api.model.dto.countryarea.CountryAreaPAASDTO;
import com.ssy.lingxi.platform.manage.service.paas.ICountryAreaPAASService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @menu 国家 - （系统初始化）PAAS接口
 * @author fhj
 * @version 2.0.0
 * @date 2020/9/17
 */
@Api(tags = "国家 - （系统初始化）PAAS接口")
@RestController
@RequestMapping("/manage/paas/countryAreaPAAS")
public class CountryAreaPAASController {

    @Resource
    private ICountryAreaPAASService countryAreaPAASService;

    @ApiOperation(value = "新增")
    @PostMapping(value = "/add")
    public Wrapper<Void> add(@RequestBody CountryAreaPAASDTO dto) {
        return countryAreaPAASService.add(dto);
    }

    @ApiOperation(value = "修改")
    @PostMapping(value = "/update")
    public Wrapper<Void> update(@RequestBody CountryAreaPAASDTO dto) {
        return countryAreaPAASService.update(dto);
    }

    @ApiOperation(value = "删除")
    @PostMapping(value = "/delete")
    public Wrapper<Void> delete(@RequestBody CountryAreaPAASDTO dto) {
        return countryAreaPAASService.delete(dto);
    }

    @ApiOperation(value = "停用/启用")
    @PostMapping(value = "/enable")
    public Wrapper<Void> enable(@RequestBody CountryAreaPAASDTO dto) {
        return countryAreaPAASService.enable(dto);
    }
}
